package com.chartboost.sdk.impl;

import android.content.Context;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.LinearLayout.LayoutParams;
import com.chartboost.sdk.Libraries.d;
import org.json.JSONObject;

public class i extends c
  implements h.b
{
  private WebView b;

  public i(Context paramContext)
  {
    super(paramContext);
    this.b = new WebView(paramContext);
    addView(this.b, new LinearLayout.LayoutParams(-1, -1));
    this.b.setBackgroundColor(0);
    this.b.setWebViewClient(new WebViewClient()
    {
      public boolean shouldOverrideUrlLoading(WebView paramAnonymousWebView, String paramAnonymousString)
      {
        if (paramAnonymousString == null)
          return false;
        if ((paramAnonymousString.contains("chartboost")) && (paramAnonymousString.contains("click")) && (i.this.a != null))
          i.this.a.onClick(i.this);
        return true;
      }
    });
  }

  public int a()
  {
    return d.a(100, getContext());
  }

  public void a(JSONObject paramJSONObject, int paramInt)
  {
    String str = paramJSONObject.optString("html");
    if (str != null);
    try
    {
      this.b.loadDataWithBaseURL("file:///android_res/", str, "text/html", "UTF-8", null);
      return;
    }
    catch (Exception localException)
    {
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.chartboost.sdk.impl.i
 * JD-Core Version:    0.6.2
 */